/*
 * CAppStateClient.h
 *
 *  Created on: 25/12/2012
 *      Author: Dalton
 */

#ifndef CAPPSTATECLIENT_H_
#define CAPPSTATECLIENT_H_
#include "CAppState.h"
#include <SDL/SDL.h>
#include "CNet.h"
#include <SDL/SDL_net.h>
#include <SDL/SDL_ttf.h>

class CAppStateClient : public CAppState{
	private:
		static CAppStateClient instance;
		SDL_Surface* surface;
		bool connected;
		CClientSocket* tcpClient;
		CIpAddress* remoteip;
		CNetMessage msg;
		TTF_Font* font;
		SDL_Surface* textConnected;
		SDL_Surface* textReceived;
	private:
		CAppStateClient();
	 public:
			void sendMsg();

	        void onActivate();

	        void onDeactivate();

	        void onLoop();

	        void onRender(SDL_Surface* surfDisplay);

	        static CAppStateClient* getInstance();

};


#endif /* CAPPSTATECLIENT_H_ */
